<template>
  <div>
    <div style="text-align: center;"><h3>花瓣</h3></div>
    <!-- <swiper :images="images"></swiper> -->
    <!-- <img src="../../../assets/花瓣网.png" alt=""> -->
    <van-grid :border="false" :column-num="2">
      <van-grid-item v-for="(v, i) in list" :key="i">
        <van-image
          :src="
            v.goods_small_logo
              ? v.goods_small_logo
              : 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg'
          "
          v-lazy="
            v.goods_small_logo
              ? v.goods_small_logo
              : 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg'
          "
        />
        <div>{{ v.goods_name }}</div>
        
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { searchApi } from "@/api/api";
import { swiperdataApi } from "@/api/api";

import swiper from "@/components/swiper.vue";
const images = ref([]);
const swiperFun = () => {
  swiperdataApi().then((res) => {
    images.value = res.data.message;
  });
};
swiperFun();

const list = ref([]);

const searchFun = () => {
  searchApi().then((res) => {
    list.value = res.data.message.goods;
  });
};
searchFun();
</script>

<style lang="scss" scoped></style>
